﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DBControl;

namespace ProjectX
{
    public partial class News : Errorbase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string newsid = Request.QueryString["newsid"];
                string getnewsbody = "SELECT * FROM News WHERE newsid='" + newsid + "'";
                SqlDbHelper sdh = new SqlDbHelper();
                this.newsDetil.DataSource = sdh.ExecuteDataTable(getnewsbody);
                this.newsDetil.DataBind();
            }
        }

        protected void logout_Click(object sender, EventArgs e)
        {
            Session.Clear();
            Response.Write("<script language='javascript'>window.parent.location.href='/'</script>");
        }
    }
}